/*
** job.c for 42sh in /home/guina_b/
** 
** Made by benoit guina
** Login   <guina_b@epitech.net>
** 
** Started on  Fri Jan 01 00:00:00 2010 benoit guina
** Last update Fri Jan 01 00:00:00 2010 benoit guina
*/

#include "alloc.h"
#include "job.h"

t_job *job_init(int num)
{
  t_job *r;

  if ((r = xmalloc(sizeof(t_job), __FILE__, __LINE__)))
  {
    r->num = num;
  }
  return (r);
}

void job_free(t_job *job)
{
  xfree(job);
}

int job_set_status(t_job *job, e_job_status status)
{
  job->status = status;
  return (0);
}

int job_sort(t_job *job0, t_job *job1)
{
  return (job0->num > job1->num);
}
